<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Creates a text field object</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="swftextfield.align.html">SWFTextField::align</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="swftextfield.setbounds.html">SWFTextField::setBounds</a></div>
 <div class="up"><a href="class.swftextfield.html">SWFTextField</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="swftextfield.construct" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SWFTextField::__construct</h1>
  <p class="verinfo">(PHP 5 &lt;= 5.3.0, PECL ming SVN)</p><p class="refpurpose"><span class="refname">SWFTextField::__construct</span> &mdash; <span class="dc-title">Creates a text field object</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-swftextfield.construct-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>SWFTextField::__construct</strong></span>
    ([ <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code></span>
  ] )</div>

  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">此函数是<em class="emphasis">实验性</em>的。此函数的表象，包括名称及其相关文档都可能在未来的
PHP 发布版本中未通知就被修改。使用本函数风险自担 。</p></div>
  <p class="para">
   <span class="function"><strong>swftextfield()</strong></span> creates a new text field object. 
   Text Fields are less flexible than <span class="function"><strong>swftext()</strong></span> objects- 
   they can&#039;t be rotated, scaled non-proportionally, or skewed, but they can
   be used as form entries, and they can use browser-defined fonts.
  </p>
  <p class="para">
   The optional flags change the text field&#039;s behavior. It has the following
   possibles values : 
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      SWFTEXTFIELD_DRAWBOX draws the outline of the textfield
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      SWFTEXTFIELD_HASLENGTH 
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      SWFTEXTFIELD_HTML allows text markup using HTML-tags
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      SWFTEXTFIELD_MULTILINE allows multiple lines
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      SWFTEXTFIELD_NOEDIT indicates that the field shouldn&#039;t be user-editable
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      SWFTEXTFIELD_NOSELECT makes the field non-selectable 
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      SWFTEXTFIELD_PASSWORD obscures the data entry
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      SWFTEXTFIELD_WORDWRAP allows text to wrap
     </span>
    </li>
   </ul>
   Flags are combined with the bitwise 
   <a href="language.operators.bitwise.html" class="link">OR</a> operation. For example, 
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$t&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">newSWFTextField</span><span style="color: #007700">(</span><span style="color: #0000BB">SWFTEXTFIELD_PASSWORD&nbsp;</span><span style="color: #007700">|&nbsp;</span><span style="color: #0000BB">SWFTEXTFIELD_NOEDIT</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

    creates a totally useless non-editable password field. 
  </p>
  <p class="simpara">
   SWFTextField has the following methods : <span class="function"><a href="swftextfield.setfont.html" class="function">swftextfield::setfont()</a></span>,
   <span class="function"><a href="swftextfield.setbounds.html" class="function">swftextfield::setbounds()</a></span>, <span class="function"><a href="swftextfield.align.html" class="function">swftextfield::align()</a></span>, 
   <span class="function"><a href="swftextfield.setheight.html" class="function">swftextfield::setheight()</a></span>, <span class="function"><a href="swftextfield.setleftmargin.html" class="function">swftextfield::setleftmargin()</a></span>, 
   <span class="function"><a href="swftextfield.setrightmargin.html" class="function">swftextfield::setrightmargin()</a></span>, <span class="function"><a href="swftextfield.setmargins.html" class="function">swftextfield::setmargins()</a></span>, 
   <span class="function"><a href="swftextfield.setindentation.html" class="function">swftextfield::setindentation()</a></span>, <span class="function"><a href="swftextfield.setlinespacing.html" class="function">swftextfield::setlinespacing()</a></span>, 
   <span class="function"><a href="swftextfield.setcolor.html" class="function">swftextfield::setcolor()</a></span>, <span class="function"><a href="swftextfield.setname.html" class="function">swftextfield::setname()</a></span> and 
   <span class="function"><a href="swftextfield.addstring.html" class="function">swftextfield::addstring()</a></span>.
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="swftextfield.align.html">SWFTextField::align</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="swftextfield.setbounds.html">SWFTextField::setBounds</a></div>
 <div class="up"><a href="class.swftextfield.html">SWFTextField</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
